package com.lywz.biz.common.entity.example;

import java.util.Date;

import javax.persistence.Entity;
import javax.persistence.EntityResult;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.NamedNativeQueries;
import javax.persistence.NamedNativeQuery;
import javax.persistence.SqlResultSetMapping;
import javax.persistence.SqlResultSetMappings;
import javax.persistence.Table;

import org.hibernate.annotations.GenericGenerator;

import com.lywz.core.entity.AbstractEntity;
import com.lywz.core.entity.EntityAnnotation;

@Entity
@NamedNativeQueries(@NamedNativeQuery(name = "city2.queryCity", query = "select * from city2", resultSetMapping = "city2"))
@SqlResultSetMappings(@SqlResultSetMapping(name = "city2", entities = { @EntityResult(entityClass = com.lywz.biz.common.entity.example.City2.class) }))
@Table(name = "city2")
@EntityAnnotation
public class City2 extends AbstractEntity {
    private static final long serialVersionUID = 4670881319124226563L;

    @Id
    @GeneratedValue(generator = "uuid")
    @GenericGenerator(name = "uuid", strategy = "uuid")
    private String id;

    private String name;

    private Date createDate;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Date getCreateDate() {
        return createDate;
    }

    public void setCreateDate(Date createDate) {
        this.createDate = createDate;
    }

}
